package struts.control;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import struts.bean.BaseBean;
import struts.bean.DepartBean;

public class DepartmentAction implements BaseAction {

	@Override
	public String execute(HttpServletRequest request, HttpServletResponse response,BaseBean form) {
		String result="fail";
		DepartBean dep=(DepartBean)form;
		if(dep.getDepartname().equals("aa")){
			result="success";
		}
		request.setAttribute("dep", dep.getDepartname());
		return result;
	}

}
